package cn.cloudplug.instar_ec.main.base;

import android.os.Bundle;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.view.View;

import cn.cloudplug.core.delegate.ScentDelegate;
import cn.cloudplug.instar_ec.main.suspensionkey.SuspensionKeyManager;

/**
 * Created by pc on 2018/2/8.
 */

public abstract class InstarDelegate extends ScentDelegate {
    @Override
    public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) {
        super.onViewCreated(view, savedInstanceState);
    }

    @Override
    public void onHiddenChanged(boolean hidden) {
        super.onHiddenChanged(hidden);
        if(!hidden){
            SuspensionKeyManager.getInstance().delegate(this);
        }
    }

    @Override
    public void onSupportVisible() {
        super.onSupportVisible();
        SuspensionKeyManager.getInstance().delegate(this);
    }
}
